package com.cg.controller;

import com.cg.client.AppClient;
import com.cg.dto.DateDto;
import com.cg.dto.Result;
import com.cg.vo.ArrangeDoctorVo;
import com.cg.vo.DateListVo;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.text.ParseException;
import java.util.List;

/**
 * @ClassName ArrangeController
 * @Description TODO
 * @Author CG
 * @Date 2024/1/8 14:48
 **/
@RestController
@RequestMapping("/arrange")
public class ArrangeController {


    @Resource
    private AppClient appClient;


    /**
     * 预约-选择科室日期
     */
    @PostMapping("/queryDateList")
    public Result<DateListVo> queryDateList(@RequestBody DateDto dateDto) throws ParseException{
        return appClient.queryDateList(dateDto);
    }


    /**
     * 根据divideId和时间查询医生信息
     */
    @PostMapping("/queryArrangeDoctor")
    public Result<List<ArrangeDoctorVo>> queryArrangeDoctor(@RequestBody DateDto dateDto){
        return appClient.queryArrangeDoctor(dateDto);
    }

}
